Show ancestor information in Trace Column

Is there a way to display the attribute information of the object that you are linked to in the traceability column in DOORS, when you run the Analysis wizard?
mvenos - Mon Jan 24 16:13:31 EST 2011

Re: Show ancestor information in Trace Column
llandale - Mon Jan 24 17:46:04 EST 2011

I must not understand the question because it seems to me the analys wizard's purpose is to display such information. Perhaps you can provide a little example; Object A1 in module A linked to Object B3 in module B ...

  • Louie

Re: Show ancestor information in Trace Column
PDU - Tue Jan 25 01:32:14 EST 2011

If your question is : "can i display an other attribute than those listed in the Wizard ?", the answer is yes.

First create a traceability column with the wizard, with for example the attribute "Object Text".
Second menu : Tools -> Support Tools -> Convert Layout DXL To Attribute DXL
Third : edit this new attribute and replace "Object Text" by the attribute you want.

Pierre

Re: Show ancestor information in Trace Column
mvenos - Tue Jan 25 08:56:14 EST 2011

Sorry my question should read:
Is there a way to display the attribute information of the ANCESTOR of the object that you are linked to, in the traceability column in DOORS when you run the Analysis wizard? So basically all of my requirements are linked to requirements in another module, but they are not linked to the Parent object, which contains the Object Heading of that requirement (We separate requirement heading names and requirements into separate objects). But one of my users wants to generate a report which shows those Object Headings in the traceability column, instead of the requiremnent text itself. So the only way I can think to do that is to either create the links explicitly to the requirement heading themselves, or somehow display through DXL the object heading of the ancestor of the requirement, which would be the requirement heading.

Re: Show ancestor information in Trace Column
PDU - Tue Jan 25 09:49:37 EST 2011

mvenos - Tue Jan 25 08:56:14 EST 2011
Sorry my question should read:
Is there a way to display the attribute information of the ANCESTOR of the object that you are linked to, in the traceability column in DOORS when you run the Analysis wizard? So basically all of my requirements are linked to requirements in another module, but they are not linked to the Parent object, which contains the Object Heading of that requirement (We separate requirement heading names and requirements into separate objects). But one of my users wants to generate a report which shows those Object Headings in the traceability column, instead of the requiremnent text itself. So the only way I can think to do that is to either create the links explicitly to the requirement heading themselves, or somehow display through DXL the object heading of the ancestor of the requirement, which would be the requirement heading.

Hi,

no, you can do it by DXL.

First create a traceability column with the wizard, with for example the attribute "Object Text".
Second menu : Tools -> Support Tools -> Convert Layout DXL To Attribute DXL
Third : edit this new attribute and replace :

s = probeRichAttr_(othero,"Object Text", false)
  if (s == "") 
    displayRich("\\pard " " ")
  else
    displayRich("\\pard " s)


by something like that :

 

s_Identifier = (identifier othero)
    s_Titre = othero."Object Heading"
        s_ObjectNumber = number(othero)
        if (s_Titre == "")
                {
                if (s_Identifier == "") 
                displayRich("\\pard " " ")
                else
                {
                        ObjetParent = parent othero
                        s_TitreParent = ObjetParent."Object Heading"
                        if (s_TitreParent == "")
                        {
                                ObjetParent = parent othero
                                s_TitreParent = ObjetParent."Object Heading"
                        }
                        if (s_TitreParentMemoire != s_TitreParent)
                        {
                                s_TitreParentMemoire = s_TitreParent
                                s_ObjectNumber = number(ObjetParent)
                                displayRich("\\pard " "\\b " "     " s_ObjectNumber  "\\b0 "  " " s_TitreParent " ")
                        }
                }
                }
        else
                {
                displayRich("\\pard " "\\b " "     " s_ObjectNumber  "\\b0 "  " " s_Titre " ")
                }


Code is not optimal, but it works.

Pierre

 

Re: Show ancestor information in Trace Column
llandale - Tue Jan 25 10:19:47 EST 2011

PDU - Tue Jan 25 09:49:37 EST 2011

Hi,

no, you can do it by DXL.

First create a traceability column with the wizard, with for example the attribute "Object Text".
Second menu : Tools -> Support Tools -> Convert Layout DXL To Attribute DXL
Third : edit this new attribute and replace :

s = probeRichAttr_(othero,"Object Text", false)
  if (s == "") 
    displayRich("\\pard " " ")
  else
    displayRich("\\pard " s)


by something like that :

 

s_Identifier = (identifier othero)
    s_Titre = othero."Object Heading"
        s_ObjectNumber = number(othero)
        if (s_Titre == "")
                {
                if (s_Identifier == "") 
                displayRich("\\pard " " ")
                else
                {
                        ObjetParent = parent othero
                        s_TitreParent = ObjetParent."Object Heading"
                        if (s_TitreParent == "")
                        {
                                ObjetParent = parent othero
                                s_TitreParent = ObjetParent."Object Heading"
                        }
                        if (s_TitreParentMemoire != s_TitreParent)
                        {
                                s_TitreParentMemoire = s_TitreParent
                                s_ObjectNumber = number(ObjetParent)
                                displayRich("\\pard " "\\b " "     " s_ObjectNumber  "\\b0 "  " " s_TitreParent " ")
                        }
                }
                }
        else
                {
                displayRich("\\pard " "\\b " "     " s_ObjectNumber  "\\b0 "  " " s_Titre " ")
                }


Code is not optimal, but it works.

Pierre

 

Here's a function to do recursive "title" searches, since the object might be a heading itself, and its possible its parent is not a heading (such as in a table).

You can tweak it to get rid of the 'truncate' feature and maxLen, and "fConCat" can be replaced with string concatenation.
{code{
//*******************
string fObjTitle(Object obj, bool useParent, string Prefix, Suffix, int maxLen)
{ // Get the "Title" of an object, which is defined
// in the following precedence order:
// 1) The object's non-null Object Heading
// 2) The object's non-null Object Short Text
// 3) Optionally the object's parent's Title (recursive).
// 4) null.
// Raw titles are limited to maxLen; -1=no max
// if truncated the "..." is appended.
// Parent Titles are pre- and post- fixed by the
// specified strings, optionally null.
// Example: Title = fObjTitle(oCurr, true, "", -1)
// will put and around a title retrieved
// from some parent.
// This function is RECURSIVE

if (null obj) return("")

Object oParent
string TitleP
string Title
string Head = obj.cl_adHead
string Short = obj.cl_adShort

if (!null Head ) Title = fTruncate(Head , maxLen, "...")
elseif (!null Short) Title = fTruncate(Short, maxLen, "...")
elseif (!useParent) Title = ""
else
{ // Use the Parent's title.
oParent = parent(obj)
if (null oParent)
TitleP = ""
else TitleP = fObjTitle(oParent, useParent, "", "", maxLen)
//***** RECURSIVE CALL *****
// Note: Prefix and Suffix are ignored for recursive searches
// to prevent multiple prefixes/suffixes in the final string.
Title = fConCat(Prefix, TitleP, Suffix)
} // end use Parent's title
return(Title)
} // end fObjTitle()

//---------------------
string fObjTitle(Object obj)
{ // Overloaded, presume Use Parent, standard pre/post fixes, no maxlen
return(fObjTitle(obj, true, "<">", -1))
} // end overloaded fObjTitle(standard)
{code}

Re: Show ancestor information in Trace Column
PDU - Wed Jan 26 01:56:09 EST 2011

llandale - Tue Jan 25 10:19:47 EST 2011
Here's a function to do recursive "title" searches, since the object might be a heading itself, and its possible its parent is not a heading (such as in a table).

You can tweak it to get rid of the 'truncate' feature and maxLen, and "fConCat" can be replaced with string concatenation.
{code{
//*******************
string fObjTitle(Object obj, bool useParent, string Prefix, Suffix, int maxLen)
{ // Get the "Title" of an object, which is defined
// in the following precedence order:
// 1) The object's non-null Object Heading
// 2) The object's non-null Object Short Text
// 3) Optionally the object's parent's Title (recursive).
// 4) null.
// Raw titles are limited to maxLen; -1=no max
// if truncated the "..." is appended.
// Parent Titles are pre- and post- fixed by the
// specified strings, optionally null.
// Example: Title = fObjTitle(oCurr, true, "", -1)
// will put and around a title retrieved
// from some parent.
// This function is RECURSIVE

if (null obj) return("")

Object oParent
string TitleP
string Title
string Head = obj.cl_adHead
string Short = obj.cl_adShort

if (!null Head ) Title = fTruncate(Head , maxLen, "...")
elseif (!null Short) Title = fTruncate(Short, maxLen, "...")
elseif (!useParent) Title = ""
else
{ // Use the Parent's title.
oParent = parent(obj)
if (null oParent)
TitleP = ""
else TitleP = fObjTitle(oParent, useParent, "", "", maxLen)
//***** RECURSIVE CALL *****
// Note: Prefix and Suffix are ignored for recursive searches
// to prevent multiple prefixes/suffixes in the final string.
Title = fConCat(Prefix, TitleP, Suffix)
} // end use Parent's title
return(Title)
} // end fObjTitle()

//---------------------
string fObjTitle(Object obj)
{ // Overloaded, presume Use Parent, standard pre/post fixes, no maxlen
return(fObjTitle(obj, true, "<">", -1))
} // end overloaded fObjTitle(standard)
{code}

Thanks Louie.